package ro.imc.rest.client.services.forclient;

import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.http.client.URL;

public class RestRequests {

	public void x() throws RequestException {
		RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode("http://www.google.com/calendar/feeds/developer-calendar@google.com/public/full"));
		builder.setHeader("content-type", "application/json"); /*
																 * or any other
																 * type that
																 * you're
																 * expecting
																 */
		// builder.se
		Request response = builder.sendRequest("?alt=json-in-script", new RequestCallback() {

			@Override
			public void onResponseReceived(Request request, Response response) {
					response.getText();
					response.getStatusCode();
			}

			@Override
			public void onError(Request request, Throwable exception) {
				// TODO Auto-generated method stub

			}
		});
	}
	
	public void y () {
	}
	}
